package com.service.imple.home;

import com.dao.UserAddressMapper;
import com.entity.UserAddress;
import com.github.pagehelper.PageInfo;
import com.service.home.UserAddressService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class UserAddressServiceImple implements UserAddressService {

    @Autowired
    private UserAddressMapper userAddressMapper;

    @Override
    public List<UserAddress> SelectAll(UserAddress userAddress) {
        return userAddressMapper.SelectAll(userAddress);
    }

    @Override
    public PageInfo<UserAddress> selectByPage(Map<String, Object> map) {
        return null;
    }

    @Override
    public List<UserAddress> select(Map map) {
        return null;
    }

    @Override
    public int insert(UserAddress userAddress) {
        return userAddressMapper.insert(userAddress);
    }

    @Override
    public int update(UserAddress userAddress) {
        return userAddressMapper.updateByPrimaryKey(userAddress);
    }

    @Override
    public int delete(int id) {
        return userAddressMapper.deleteByPrimaryKey(id);
    }
}
